<?php
class cls_serve_base
{
	var $name;
	static function get_instance($class)
	{
		$cls = "cls_serve_{$class}";
		$instance = new $cls();
		$instance->name = $class;
		return $instance;
	}
	
	function get_data($name)
	{
		if (!isset($name)) {
			$name = $this->name;
		}
		return cls_data_base::get_instance($name);
	}
	
	function get_serve($name)
	{
		if (!isset($name)) {
			return $this;
		}
		return self::get_instance($name);
	}
}